<?php
function getLists($list='') {
	global $objDB;
	$tipoList = 'anagraf';
	$aLists[$tipoList]['descr'] = 'Anagrafica';
	$aLists[$tipoList]['dir'] = '/rcom/anag';
	$aLists[$tipoList]['files']['ovf_anagrafiche']['alias'] = 'A';
	$aLists[$tipoList]['campiDef'][10] = array('Codice','A_cod_anag',2);
	$aLists[$tipoList]['campiDef'][20] = array('Nominativo','A_intestaz1',9);
	$aLists[$tipoList]['campiDef'][30] = array('Localita\'','A_localita',9);
	
	$tipoList = 'referent';
	$aLists[$tipoList]['descr'] = 'Referenti';
	$aLists[$tipoList]['dir'] = '/rcom/refe';
	$aLists[$tipoList]['files']['ovf_anag_referent']['alias'] = 'S';
	$aLists[$tipoList]['campiDef'][10] = array('identificativo','S_id_referent',20);
			
	$tipoList = 'contatti';
	$aLists[$tipoList]['descr'] = 'Contatti';
	$aLists[$tipoList]['dir'] = '/rcom/cont';
	$aLists[$tipoList]['files']['ovf_agenda']['alias'] = 'S';
	$aLists[$tipoList]['campiDef'][10] = array('identificativo','S_id_agenda',20);
		
	$tipoList = 'campagne';
	$aLists[$tipoList]['descr'] = 'Campagne';
	$aLists[$tipoList]['dir'] = '/rcom/camp';
	$aLists[$tipoList]['files']['ovf_campagne']['alias'] = 'C';
	$aLists[$tipoList]['campiDef'][10] = array('Codice','C_cod_camp',2);
	$aLists[$tipoList]['campiDef'][20] = array('Descrizione','C_descr',8);
	$aLists[$tipoList]['campiDef'][30] = array('Data inizio','C_data_iniz',5);
	$aLists[$tipoList]['campiDef'][40] = array('Data fine','C_data_fine',5);
		
	$sSql = "SELECT * FROM ovf_anag_sez WHERE tipo_sez <> 'ext'";
	$objDB->query($sSql,"selAnagSezGF");
	while($acX = $objDB->fetch("selAnagSezGF")) {
		$tipoList = $acX['cod_sez'];
		if (isset($aLists[$tipoList])) {
				continue;
		}
		$aLists[$tipoList]['descr'] = $acX['descr'];
		$aLists[$tipoList]['dir'] = '/rcom/asez';
		$aLists[$tipoList]['files']['ovf_sez_'.$tipoList]['alias'] = 'S';
		$aLists[$tipoList]['campiDef'][10] = array('identificativo','S_id_'.$tipoList,20);
	}
	if ($list=='')	return $aLists;
	if (isset($aLists[$list])) return $aLists[$list];
	return false;
}
